
namespace gen {

	class cst_expr::cst_expr_initializator 
	{
	private:
		bool m_value;
		
	public:
		cst_expr_initializator(bool value)
		: m_value(value)
		{}

		template <class IteratorT>
		bool operator()(IteratorT const& i)
		{
			return m_value;
		}
	};

	template <typename ContextT>
	domain<typename ContextT::iterator_t>
	cst_expr::evaluate(ContextT const& c) const
	{
		typedef typename ContextT::iterator_t iterator_t;
		cst_expr_initializator init(m_value);
		domain<iterator_t> result(c.domain().first(), c.domain().last(), init);
		return result;
	}

}
